{Tenpenny and company is patrolling the streets when they get a call about
Vagos with a crate of grenades blow up the cop cars. The chief wants them 
collared before they reach Las Venturas. It is a high speed chase with cop
cars blowing up right and left.}
DEFINE MISSIONS 1              // Total Missions Available
DEFINE MISSION 0 AT @MISSN_07

DEFINE EXTERNAL_SCRIPTS 0 

DEFINE UNKNOWN_EMPTY_SEGMENT 0

DEFINE UNKNOWN_THREADS_MEMORY 500

{$VERSION 3.1.0027}
var
 $PLAYER_CHAR: Player
end // var 
//Main thread starts here
03A4: name_thread 'MAIN' 
//Set the screen BLACK immediately
016A: fade 0 time 0           
01F0: set_max_wanted_level_to 6 
0111: toggle_wasted_busted_check 0 
00C0: set_current_time_hours_to 8 minutes_to 0 
//Loads Tenpenny as #SPECIAL01 or 290
023C: load_special_actor 'TENPEN' as 1 
//Create Player at Station
04E4: unknown_refresh_game_renderer_at 1541 -1675.4 
Camera.SetAtPos(1541.156, -1675.352, 13.55)
$PLAYER_CHAR = Player.Create(#NULL, 1541.156, -1675.352, 13.552)
Player.SetClothes($PLAYER_CHAR, "VEST", "VEST", Torso)
Player.SetClothes($PLAYER_CHAR, "JEANSDENIM", "JEANS", Legs)
Player.SetClothes($PLAYER_CHAR, "SNEAKERBINCBLK", "SNEAKER", Shoes)
Player.SetClothes($PLAYER_CHAR, "PLAYER_FACE", "HEAD", Head)  
Player.Build($PLAYER_CHAR)
//Changes the player to ped model 290 Tenpenny
09C7: change_player $PLAYER_CHAR model_to 290 
01F5: $PLAYER_ACTOR = create_player_actor $PLAYER_CHAR 
07AF: $PLAYER_GROUP = player $PLAYER_CHAR group 
Model.Load(#COPBIKE)
Model.Load(#COPCARLA)
Model.Load(#DESERT_EAGLE)
Model.Load(#COLT45)
038B: load_requested_models 

:MAIN_110
if or
not Model.Available(#COPBIKE)
not Model.Available(#COPCARLA)
not Model.Available(#DESERT_EAGLE)
not Model.Available(#COLT45)
else_jump @MAIN_120 
wait 0 
jump @MAIN_110 
:MAIN_120
0674: set_car_model #COPCARLA numberplate "_CRASH_"
$My_Car = Car.Create(#COPCARLA,  1535.743, -1678.094, 13.09914)
$My_Bike = Car.Create(#COPBIKE, 1535.743, -1665.094, 13.09914)
Car.SetImmunities($My_Car, 0, 1, 0, 0, 0) 
Car.Angle($My_Car) = 0                       //Headed North
Car.DoorStatus($My_Car, 0)                   //No locked doors
053F: set_car $My_Car tires_vulnerability 0  //No popped tries


01B6: set_weather 1 
0001: wait 0 ms 
01B4: toggle_player $PLAYER_CHAR can_move false //We shut down control for the cameras to work 
04BB: select_interior 0 
0629: change_integer_stat 181 to 4 
016C: restart_if_wasted_at 2027.77 -1420.52 15.99 angle 137.0 town_number 0 
016D: restart_if_busted_at 1550.68 -1675.49 14.51 angle 90.0 town_number 0 
// Note: your missions have to use the variable defined here
0180: set_on_mission_flag_to $ONMISSION  
0004: $DEFAULT_WAIT_TIME = 250
03E6: remove_text_box 
$MISSION_1 = 2
// START GAME
$ONMISSION = 0 
01B4: toggle_player $PLAYER_CHAR can_move true               
fade 1 1000 
:MAIN_LOOP
0001: wait $DEFAULT_WAIT_TIME ms
00BF: $TIME_HOURS = current_time_hours, $TIME_MINS = current_time_minutes
if and
$ONMISSION == 0
00E1:   player 0 pressed_key 11
jf @MAIN_LOOP
start_mission 0 
0002: jump @MAIN_LOOP 

//--------------------------High Speed Chase "Double Boom"----------------------
//This is where the Vagos are taking revenge for the crack house masacar.
//Back on mission "Cleaning the Hood"
:MISSN_07
03A4: name_thread 'MISSN_07' 

gosub @MISSN_07_77 
  
00D6: if 
0112:   wasted_or_busted // mission only 
004D: jump_if_false @MISSN_07_68 

02A7: $CRASH_MARKER = create_icon_marker_and_sphere 16 at 1541.156 -1675.352 13.552 

:MISSN_07_68
0050: gosub @MISSN_07_2985 
004E: end_thread 

:MISSN_07_77
01B4: set_player $PLAYER_CHAR can_move 0 
0004: $ONMISSION = 1 
0006: 100@ = 0 
00C0: set_current_time_hours_to 1 minutes_to 35 
0395: clear_area 1 at 2692.854 -1607.947 14.052 radius 50.0 
00A1: put_actor $PLAYER_ACTOR at 2692.854 -1607.947 14.052 
023C: load_special_actor 'PULASKI' as 2 // models 290-299 
023C: load_special_actor 'HERN' as 3 // models 290-299 
0247: load_model #HERMES 
0247: load_model #COPBIKE 
0247: load_model #COPCARLA 
0247: load_model #DESERT_EAGLE 
0247: load_model #COLT45 
0247: load_model #TEC9 
0247: load_model #LSV2 
0247: load_model #LSV3 
0247: load_model #LAPDM1 
0247: load_model #LAPD1 
038B: load_requested_models 
060A: create_decision_maker_type 0 store_to 75@ 
054C: use_GXT_table 'JABM07' 

:MISSN_07_224
00D6: if or
8248:   not model #HERMES available 
8248:   not model #COPBIKE available 
8248:   not model #COPCARLA available 
8248:   not model #DESERT_EAGLE available 
8248:   not model #COLT45 available 
8248:   not model #TEC9 available 
8248:   not model #LSV2 available 
8248:   not model #LSV3 available 
004D: jump_if_false @MISSN_07_284 
0001: wait 0 ms 
0002: jump @MISSN_07_224 

:MISSN_07_284
00D6: if or
8248:   not model #LAPDM1 available 
8248:   not model #LAPD1 available 
823D:   not special_actor 2 loaded 
823D:   not special_actor 3 loaded 
004D: jump_if_false @MISSN_07_324 
0001: wait 0 ms 
0002: jump @MISSN_07_284 

:MISSN_07_324
03CB: set_rendering_origin_at 2591.984 -1608.153 18.9816 
00A5: 12@ = create_car #HERMES at 2591.984 -1608.153 18.9816 
02AC: set_car 12@ immunities BP 0 FP 0 EP 0 CP 0 MP 0 
0175: set_car 12@ Z_angle_to 90.0 
0224: set_car 12@ health_to 3000 
0129: 13@ = create_actor_pedtype 9 model #LSV2 in_car 12@ driverseat 
0446: set_actor 13@ immune_to_headshots 0 
01C8: 14@ = create_actor_pedtype 9 model #LSV3 in_car 12@ passenger_seat 0 
0446: set_actor 14@ immune_to_headshots 0 
01B2: give_actor 14@ weapon 32 ammo 999999 // Load the weapon model before using this 
01B9: set_actor 14@ armed_weapon_to 32 
0713: actor 14@ driveby_actor $PLAYER_ACTOR car -1 point 0.0 0.0 0.0 radius 100.0 4 0 firing_rate 90 
0187: 90@ = create_marker_above_actor 13@ 
07E0: set_marker 90@ type_to 0 
0165: set_marker 90@ color_to 0 
0674: set_car_model #COPCARLA numberplate "_CRASH_" 
00A5: 15@ = create_car #COPCARLA at 2720.819 -1302.769 52.944 
0175: set_car 15@ Z_angle_to 185.0 
020A: set_car 15@ door_status_to 0 
053F: set_car 15@ tires_vulnerability 0 
01F7: set_player $PLAYER_CHAR ignored_by_cops 1 
036A: put_actor $PLAYER_ACTOR in_car 15@ 
01C8: 16@ = create_actor_pedtype 24 model #SPECIAL02 in_car 15@ passenger_seat 0 
0223: set_actor 16@ health_to 1500 
01B2: give_actor 16@ weapon 22 ammo 99999 // Load the weapon model before using this 
060B: set_actor 16@ decision_maker_to 75@      
0631: put_actor 16@ in_group $PLAYER_GROUP
01C8: 17@ = create_actor_pedtype 24 model #SPECIAL03 in_car 15@ passenger_seat 1 
0223: set_actor 17@ health_to 1500 
01B2: give_actor 17@ weapon 22 ammo 99999 // Load the weapon model before using this 
060B: set_actor 17@ decision_maker_to 75@      
0631: put_actor 17@ in_group $PLAYER_GROUP 
0713: actor 16@ driveby_actor 13@ car -1 point 0.0 0.0 0.0 radius 100.0 4 1 firing_rate 90 
0713: actor 17@ driveby_actor 13@ car -1 point 0.0 0.0 0.0 radius 100.0 4 1 firing_rate 90 
01B2: give_actor $PLAYER_ACTOR weapon 24 ammo 170 // Load the weapon model before using this 
05D1: AS_actor $PLAYER_ACTOR drive_car 15@ to 2691.867 -1607.949 14.1903 speed -1 0 model #COPCARLA 1 
067C: put_camera_on_actor $PLAYER_ACTOR with_offset 0.5 2.0 1.2 rotation 0.0 0.0 0.0 0.0 2 
03CB: set_rendering_origin_at 2692.854 -1607.947 14.052 
03E6: remove_text_box 
0707: start_scene_skip_to @MISSN_07_1239 
02A3: enable_widescreen 1 
016A: fade 1 time 1000 
99@ = 0 //Audio counter
:MISSN_07_500
0001: wait 0 ms 
00D6: if
not fading
jf @MISSN_07_500

:MISSN_07_854
0001: wait 0 ms 
00D6: if 
00EE:   actor $PLAYER_ACTOR 0 near_point 2725.715 -1337.201 radius 15.0 15.0 in_car 
004D: jump_if_false @MISSN_07_854 
067C: put_camera_on_actor 17@ with_offset -2.5 1.0 0.5 rotation 0.0 0.0 0.0 0.0 2 

:MISSN_07_938
0001: wait 0 ms 
00D6: if 
gosub @MISSN_07_PLAY
00EE:   actor $PLAYER_ACTOR 0 near_point 2725.63 -1363.813 radius 15.0 15.0 in_car 
004D: jump_if_false @MISSN_07_938 
067C: put_camera_on_actor 16@ with_offset 0.5 0.0 0.75 rotation 0.0 0.0 0.0 0.0 2 

:MISSN_07_1022
0001: wait 0 ms 
gosub @MISSN_07_PLAY
00D6: if 
00EE:   actor $PLAYER_ACTOR 0 near_point 2725.717 -1382.928 radius 15.0 15.0 in_car 
004D: jump_if_false @MISSN_07_1022 
067C: put_camera_on_actor $PLAYER_ACTOR with_offset -7.0 -10.0 20.0 rotation 0.0 0.0 0.0 0.0 2 

:MISSN_07_1106
0001: wait 0 ms 
gosub @MISSN_07_PLAY
00D6: if 
00EE:   actor $PLAYER_ACTOR 0 near_point 2725.317 -1583.443 radius 15.0 15.0 in_car 
004D: jump_if_false @MISSN_07_1106 
067C: put_camera_on_actor $PLAYER_ACTOR with_offset 0.5 -5.0 0.5 rotation 0.0 0.0 0.0 0.0 2 
0397: enable_car 15@ siren 1 

:MISSN_07_1197
0001: wait 0 ms 
gosub @MISSN_07_PLAY
00D6: if 
00EE:   actor $PLAYER_ACTOR 0 near_point 2691.867 -1607.949 radius 4.0 4.0 in_car 
004D: jump_if_false @MISSN_07_1197 

:MISSN_07_1239
0701: end_scene_skip 
00D6: if 
80EE:   not actor $PLAYER_ACTOR 0 near_point 2691.867 -1607.949 radius 4.0 4.0 in_car 
004D: jump_if_false @MISSN_07_1316 
0397: enable_car 15@ siren 1 
00AB: put_car 15@ at 2663.736 -1607.672 17.308 
0175: set_car 15@ Z_angle_to 90.0 

:MISSN_07_1316
02A3: enable_widescreen 0 
03A2: set_car 15@ action 0 
01B4: set_player $PLAYER_CHAR can_move 1 
02EB: restore_camera_with_jumpcut 
0373: set_camera_directly_behind_player 
04BA: set_car 15@ speed_to 25.0 
00A5: 21@ = create_car #COPBIKE at 2699.83 -1607.695 13.5927 
0129: 25@ = create_actor_pedtype 6 model #LAPDM1 in_car 21@ driverseat 
0223: set_actor 25@ health_to 100 
0397: enable_car 21@ siren 1 
00A5: 22@ = create_car #COPCARLA at 2710.455 -1612.568 12.6047 
0129: 26@ = create_actor_pedtype 6 model #LAPD1 in_car 22@ driverseat 
0223: set_actor 26@ health_to 100 
01C8: 27@ = create_actor_pedtype 6 model #LAPD1 in_car 22@ passenger_seat 0 
0223: set_actor 27@ health_to 100 
0397: enable_car 22@ siren 1 
01B2: give_actor 27@ weapon 32 ammo 999999 // Load the weapon model before using this 
01B9: set_actor 27@ armed_weapon_to 32 
0713: actor 27@ driveby_actor 13@ car -1 point 0.0 0.0 0.0 radius 100.0 4 1 firing_rate 90 
00A5: 23@ = create_car #COPBIKE at 2699.83 -1611.289 13.5927 
0129: 28@ = create_actor_pedtype 6 model #LAPDM1 in_car 23@ driverseat 
0223: set_actor 28@ health_to 100 
0397: enable_car 23@ siren 1 
00A5: 24@ = create_car #COPCARLA at 2710.455 -1608.5 12.6047 
0129: 29@ = create_actor_pedtype 6 model #LAPD1 in_car 24@ driverseat 
0223: set_actor 29@ health_to 100 
01C8: 30@ = create_actor_pedtype 6 model #LAPD1 in_car 24@ passenger_seat 0 
0223: set_actor 30@ health_to 100 
0397: enable_car 24@ siren 1 
01B2: give_actor 30@ weapon 32 ammo 999999 // Load the weapon model before using this 
01B9: set_actor 30@ armed_weapon_to 32 
0713: actor 30@ driveby_actor 13@ car -1 point 0.0 0.0 0.0 radius 100.0 4 1 firing_rate 90 
0175: set_car 21@ Z_angle_to 90.0 
0175: set_car 22@ Z_angle_to 90.0 
0175: set_car 23@ Z_angle_to 90.0 
0175: set_car 24@ Z_angle_to 90.0 

jump @MISSN_07_1744 

//Play Audio Progressive Mode
:MISSN_07_PLAY
if 
99@ == 0
then 
03CF: load_wav 45238 as 1 
99@ += 1
98@ = 0  //Audio is not playing
00BC: show_text_highpriority GXT 'DB01' time 3000 flag 1  
end

if 
99@ == 2
then 
03CF: load_wav 45237 as 1 
99@ += 1
98@ = 0  //Audio is not playing
00BC: show_text_highpriority GXT 'DB02' time 9000 flag 1  
end

if 
99@ == 4
then 
03CF: load_wav 45239 as 1 
99@ += 1
98@ = 0  //Audio is not playing
00BC: show_text_highpriority GXT 'DB03' time 10000 flag 1  
end

if 
99@ == 6
then 
03CF: load_wav 45240 as 1 
99@ += 1
98@ = 0  //Audio is not playing
00BC: show_text_highpriority GXT 'DB04' time 3000 flag 1  
end

if  
03D0:   wav 1 loaded 
jf @MISSN_07_RET

if
98@ == 0 
then
03D1: play_wav 1
98@ = 1 
end

if 
03D2:   wav 1 ended 
jf @MISSN_07_RET
040D: unload_wav 1
99@ += 1
:MISSN_07_RET
return
//End of Audio 

:MISSN_07_1744
05D1: AS_actor 13@ drive_car 12@ to 2337.558 -1598.564 5.6505 speed 40.0 0 model #HERMES 8 

:MISSN_07_1779
0001: wait 0 ms 
00D6: if 
8119:   not car 12@ wrecked 
004D: jump_if_false @MISSN_07_2871 
00D6: if or
8118:   not actor 13@ dead 
8118:   not actor 14@ dead 
004D: jump_if_false @MISSN_07_2871 
00AA: store_car 12@ position_to 8@ 9@ 10@ 
00D6: if or
00EE:   actor $PLAYER_ACTOR 0 near_point 8@ 9@ radius 40.0 40.0 in_car 
00EE:   actor 25@ 0 near_point 8@ 9@ radius 40.0 40.0 in_car 
00EE:   actor 26@ 0 near_point 8@ 9@ radius 40.0 40.0 in_car 
00EE:   actor 28@ 0 near_point 8@ 9@ radius 40.0 40.0 in_car 
00EE:   actor 29@ 0 near_point 8@ 9@ radius 40.0 40.0 in_car 
004D: jump_if_false @MISSN_07_2096 
0001: wait 1000 ms 
00D6: if 
00EE:   actor 13@ 0 near_point 8@ 9@ radius 8.0 8.0 in_car 
004D: jump_if_false @MISSN_07_2010 
0001: wait 0 ms 
0002: jump @MISSN_07_2096 

:MISSN_07_2010
0208: 80@ = random_float_in_ranges -2.0 2.0 
005B: 8@ += 80@ // (float) 
0208: 80@ = random_float_in_ranges -2.0 2.0 
005B: 9@ += 80@ // (float) 
0208: 80@ = random_float_in_ranges 0.0 1.5 
005B: 10@ += 80@ // (float) 
020C: create_explosion_with_radius 0 at 8@ 9@ 10@ 
0001: wait 50 ms 

:MISSN_07_2096
00AA: store_car 12@ position_to 8@ 9@ 10@ 
00D6: if and
8118:   not actor 25@ dead 
8119:   not car 21@ wrecked 
004D: jump_if_false @MISSN_07_2159 
05D1: AS_actor 25@ drive_car 21@ to 8@ 9@ 10@ speed 55.0 0 model #NULL 2 

:MISSN_07_2159
00D6: if and
8118:   not actor 26@ dead 
8119:   not car 22@ wrecked 
004D: jump_if_false @MISSN_07_2208 
05D1: AS_actor 26@ drive_car 22@ to 8@ 9@ 10@ speed 68.0 0 model #NULL 2 

:MISSN_07_2208
00D6: if and
8118:   not actor 28@ dead 
8119:   not car 23@ wrecked 
004D: jump_if_false @MISSN_07_2257 
05D1: AS_actor 28@ drive_car 23@ to 8@ 9@ 10@ speed 57.0 0 model #NULL 2 

:MISSN_07_2257
00D6: if and
8118:   not actor 29@ dead 
8119:   not car 24@ wrecked 
004D: jump_if_false @MISSN_07_2306 
05D1: AS_actor 29@ drive_car 24@ to 8@ 9@ 10@ speed 60.0 0 model #NULL 2 

:MISSN_07_2306
00D6: if 
00EE:   actor 13@ 0 near_point 2337.558 -1598.564 radius 5.0 5.0 in_car 
004D: jump_if_false @MISSN_07_2379 
05D1: AS_actor 13@ drive_car 12@ to 2035.26 -1501.371 2.9352 speed 35.0 0 model #HERMES 2 

:MISSN_07_2379
00D6: if 
00EE:   actor 13@ 0 near_point 2035.26 -1501.371 radius 5.0 5.0 in_car 
004D: jump_if_false @MISSN_07_2452 
05D1: AS_actor 13@ drive_car 12@ to 1746.327 -1501.749 15.0419 speed 30.0 0 model #HERMES 2 

:MISSN_07_2452
00D6: if 
00EE:   actor 13@ 0 near_point 1746.327 -1501.749 radius 5.0 5.0 in_car 
004D: jump_if_false @MISSN_07_2525 
05D1: AS_actor 13@ drive_car 12@ to 1606.646 -1364.238 28.4511 speed 35.0 0 model #HERMES 2 

:MISSN_07_2525
00D6: if 
00EE:   actor 13@ 0 near_point 1606.646 -1364.238 radius 5.0 5.0 in_car 
004D: jump_if_false @MISSN_07_2598 
05D1: AS_actor 13@ drive_car 12@ to 1721.626 -616.597 39.0376 speed 35.0 0 model #HERMES 2 

:MISSN_07_2598
00D6: if 
00EE:   actor 13@ 0 near_point 1721.626 -616.597 radius 5.0 5.0 in_car 
004D: jump_if_false @MISSN_07_2671 
05D1: AS_actor 13@ drive_car 12@ to 1638.32 -12.2125 36.2052 speed 40.0 0 model #HERMES 2 

:MISSN_07_2671
00D6: if 
00EE:   actor 13@ 0 near_point 1638.32 -12.2125 radius 5.0 5.0 in_car 
004D: jump_if_false @MISSN_07_2744 
05D1: AS_actor 13@ drive_car 12@ to 1620.893 132.0353 36.0613 speed 45.0 0 model #HERMES 2 

:MISSN_07_2744
00D6: if 
00EE:   actor 13@ 0 near_point 1620.893 132.0353 radius 5.0 5.0 in_car 
004D: jump_if_false @MISSN_07_2817 
05D1: AS_actor 13@ drive_car 12@ to 1777.511 620.8452 20.3403 speed 50.0 0 model #HERMES 2 

:MISSN_07_2817
00D6: if 
00EE:   actor 13@ 0 near_point 1777.511 620.8452 radius 5.0 5.0 in_car 
004D: jump_if_false @MISSN_07_2864 
0050: gosub @MISSN_07_2901 
0051: return 

:MISSN_07_2864
0002: jump @MISSN_07_1779 

:MISSN_07_2871
00BE: text_clear_all 
03E6: remove_text_box 
0050: gosub @MISSN_07_2941 
0925: restore_camera_to_user_defined 
0373: set_camera_directly_behind_player 
02A3: enable_widescreen 0 
01B4: set_player $PLAYER_CHAR can_move 1 
02EB: restore_camera_with_jumpcut 
0051: return 

:MISSN_07_2901
00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1  // ~r~MISSION FAILED!
02A7: $CRASH_MARKER = create_icon_marker_and_sphere 16 at 1541.156 -1675.352 13.552 
0051: return 

:MISSN_07_2941
$MISSION_TP += 1
030C: progress_made += 1 
0394: play_music 1 
0110: clear_player $PLAYER_CHAR wanted_level 
01E3: show_text_1number_styled GXT 'M_PASSR' number 7 time 5000 style 1  // MISSION PASSED!~n~~w~RESPECT +
0998: add_respect 1 
0051: return 

:MISSN_07_2985
0004: $ONMISSION = 0 
01BD: $Current_Time_in_ms = current_time_in_ms 
0164: disable_marker 90@ 
0249: release_model #HERMES 
0249: release_model #COPBIKE 
0249: release_model #COPCARLA 
0249: release_model #DESERT_EAGLE 
0249: release_model #COLT45 
0249: release_model #TEC9 
0249: release_model #LSV2 
0249: release_model #LSV3 
0249: release_model #LAPDM1 
0249: release_model #LAPD1 
034F: destroy_actor_with_fade 16@ 
034F: destroy_actor_with_fade 17@ 
00D8: mission_cleanup 
0051: return 


